package com.study.d6_date_time;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

public class Test2 {
    public static void main(String[] args) {
        //获取本地时间对象
        LocalTime lt = LocalTime.now();
        System.out.println(lt);

        //获取时间中信息
        System.out.println(lt.getHour());
        System.out.println(lt.getMinute());
        System.out.println(lt.getSecond());
        //纳秒
        System.out.println(lt.getNano());

        //lt.plus加  lt.minus减

        //获取指定时分秒
        System.out.println(LocalTime.of(15, 10, 16, 56555));
        //equal isAfter isBefore 相等在后在前
        LocalDate ld = LocalDate.now();

        //分久必合
        System.out.println(LocalDateTime.of(ld, lt));
    }
}
